//
//  HotModel.m
//  intelligent
//
//  Created by 甘世清 on 2024/3/2.
//

#import "HotModel.h"

@implementation HotModel
+ (NSDictionary *)mj_replacedKeyFromPropertyName
{
   return @{@"userid": @"id"};
}
- (float)width{
    if ([_title isEqualToString:@"1:1"]) {
        return 24;
    } else  if ([_title isEqualToString:@"9:16"]) {
        return 18;
    }else  if ([_title isEqualToString:@"16:9"]) {
        return 24;
    }
    return 0;
}
- (float)height{
    if ([_title isEqualToString:@"1:1"]) {
        return 24;
    } else  if ([_title isEqualToString:@"9:16"]) {
        return 24;
    }else  if ([_title isEqualToString:@"16:9"]) {
        return 18;
    }
    return 0;
}
- (CGSize)cellSize{
    if ([_title isEqualToString:@"1:1"]) {
        return CGSizeMake((SCREEN_WIDETH-46)/3.f-1, (SCREEN_WIDETH-46)/3.f-1);
    } else  if ([_title isEqualToString:@"9:16"]) {
        return CGSizeMake((SCREEN_WIDETH-46)/3.f-1, (((SCREEN_WIDETH-46)/3.f-1)/3)*4);
    }else  if ([_title isEqualToString:@"16:9"]) {
        return CGSizeMake((((SCREEN_WIDETH-46)/3.f-1)/3)*4,(SCREEN_WIDETH-46)/3.f-1);
    }
     return CGSizeMake((SCREEN_WIDETH-46)/3.f-1, (SCREEN_WIDETH-46)/3.f-1);;
}
@end
